package com.example.listener;

import com.example.event.CustomEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Order(1)
public class FirstEventListener implements ApplicationListener<CustomEvent> {
    // 处理逻辑
    @Override
    public void onApplicationEvent(CustomEvent event) {
        System.out.println("FirstEventListener Received custom event - " + event.getMessage());
    }
}
